package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.MonthDeptListMapper;
import com.aidex.biz.domain.MonthDeptList;
import com.aidex.biz.service.MonthDeptListService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 月报管理Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-01-21
 */
@Service
@Transactional(readOnly = true)
public class MonthDeptListServiceImpl extends BaseServiceImpl<MonthDeptListMapper, MonthDeptList> implements MonthDeptListService
{
    private static final Logger log = LoggerFactory.getLogger(MonthDeptListServiceImpl.class);

    /**
     * 获取单条数据
     * @param monthDeptList 月报管理
     * @return 月报管理
     */
    @Override
    public MonthDeptList get(MonthDeptList monthDeptList)
    {
        MonthDeptList dto = super.get(monthDeptList);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 月报管理id
     * @return 月报管理
     */
    @Override
    public MonthDeptList get(String id)
    {
        MonthDeptList dto = super.get(id);
        return dto;
    }


    /**
     * 查询月报管理列表
     * @param monthDeptList 月报管理
     * @return 月报管理
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<MonthDeptList> findList(MonthDeptList monthDeptList)
    {
        return super.findList(monthDeptList);
    }

    /**
     * 分页查询月报管理列表
     * @param monthDeptList 月报管理
     * @return 月报管理
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<MonthDeptList> findPage(MonthDeptList monthDeptList)
    {
        return super.findPage(monthDeptList);
    }

    /**
     * 保存月报管理
     * @param monthDeptList
     * @return 结果
     */
    @Override
    public boolean save(MonthDeptList monthDeptList)
    {
        return super.save(monthDeptList);
    }


    /**
     * 删除月报管理信息
     * @param monthDeptList
     * @return 结果
     */
    @Override
    public boolean remove(MonthDeptList monthDeptList)
    {
        return super.remove(monthDeptList);
    }

    /**
     * 批量删除月报管理
     * @param ids 需要删除的月报管理ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteMonthDeptListByIds(String[] ids)
    {
        return mapper.deleteMonthDeptListByIds(ids);
    }

    /**
     * 获取最大编号
     * @param monthDeptList 月报管理
     * @return 结果
     */
    @Override
    public int findMaxSort(MonthDeptList monthDeptList)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(monthDeptList));
    }
}
